describe("Double", function() {
  var func = doubleFormat;
  it("输入检查（注：试试在编写函数前，首先确定输入和输出）", function() {
    var input = "10";
    var output = null;
    expect(func(input)).toBe(output);

    var input = null;
    var output = null;
    expect(func(input)).toBe(null);
  });

  it("返回文本（注：编写一个方法，输入double参数，返回字符串）", function() {
    var input = 10;
    var output = "10";
    expect(func(input)).toMatch(output);
  });

  it("返回保留两位小数（注：要求对输入保留两位小数，不要四舍五入）", function() {
    var input = 5.321232132132133;
    var output = "5.32";
    expect(func(input)).toMatch(output);

    var input = 5.123;
    var output = "5.12";
    expect(func(input)).toMatch(output);

    var input = 15.13;
    var output = "15.13";
    expect(func(input)).toMatch(output);

    var input = 115.3;
    var output = "115.3";
    expect(func(input)).toMatch(output);
  });
});
